/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package exiftool;

import javax.swing.*;

/**
 * Dialog to choose the folder where the images to be displayed reside
 * @author chris
 */
public class fileChooser {

    java.io.File file;

    /**
     * Constructor
     */
    public fileChooser() {
        JFileChooser chooser = new JFileChooser();
        chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
        int result = chooser.showOpenDialog(null);
        if (result == JFileChooser.CANCEL_OPTION) {
            file = null;
            return;
        } else {
            file = chooser.getSelectedFile();
        }
        //chooser.repaint();
        //chooser.showOpenDialog(null);
    }

    /**
     * Get the name of the directory
     * @return Directory name
     */
    public java.io.File getFile() {
        return file;
    }
}
